
<%@ page import="s7m.Professor" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'professor.label', default: 'Professor')}" />
  <title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>
  <div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Página Inicial</a></span>
    <span class="menuButton"><g:link class="list" action="list"><g:message code="Listar Professor" args="[entityName]" /></g:link></span>
  </div>
  <div class="body">
    <h1><g:message code="Criar Professor" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${professorInstance}">
      <div class="errors">
        <g:renderErrors bean="${professorInstance}" as="list" />
      </div>
    </g:hasErrors>
    <g:form action="save" method="post" >
      <div class="dialog">
        <table>
          <tbody>

            <tr class="prop">
              <td valign="top" class="name">
                <label for="matricula"><g:message code="professor.matricula.label" default="Matricula" /></label>
              </td>
              <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'matricula', 'errors')}">
          <g:textField name="matricula" value="${professorInstance?.matricula}" />
          </td>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="nome"><g:message code="professor.nome.label" default="Nome" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'nome', 'errors')}">
          <g:textField name="nome" value="${professorInstance?.nome}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="sexo"><g:message code="professor.sexo.label" default="Sexo" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'sexo', 'errors')}">
          <g:select name="sexo" from="${professorInstance.constraints.sexo.inList}" value="${professorInstance?.sexo}" valueMessagePrefix="professor.sexo"  />
          </td>
          </tr>

          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="dataDeNascimento"><g:message code="professor.dataDeNascimento.label" default="Data De Nascimento" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'dataDeNascimento', 'errors')}">
          <g:textField name="dataDeNascimento" value="${professorInstance?.dataDeNascimento}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="cpf"><g:message code="professor.cpf.label" default="Cpf" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'cpf', 'errors')}">
          <g:textField name="cpf" value="${professorInstance?.cpf}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="tipoUsuario"><g:message code="professor.tipoUsuario.label" default="Tipo Usuario" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'tipoUsuario', 'errors')}">
          <g:select name="tipoUsuario" from="${professorInstance.constraints.tipoUsuario.inList}" value="${professorInstance?.tipoUsuario}" valueMessagePrefix="professor.tipoUsuario"  />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="senha"><g:message code="professor.senha.label" default="Senha" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: professorInstance, field: 'senha', 'errors')}">
          <g:passwordField name="senha" value="${professorInstance?.senha}" />
          </td>
          </tr>






          </tbody>
        </table>
      </div>
      <div class="buttons">
        <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'Criar', default: 'Criar')}" /></span>
      </div>
    </g:form>
  </div>
</body>
</html>
